<template>
  <view class="navbar" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
    <view class="logo">
      <image class="logo-image" src="@/static/images/logo.png" mode="widthFix" />
      <text class="logo-text">| 新鲜 · 亲民 · 快捷</text>
    </view>
    <view class="search">
      <text class="icon-search"> 搜索商品</text>
      <text class="icon-scan"></text>
    </view>
  </view>
</template>

<script setup lang="ts">
const { safeAreaInsets } = uni.getSystemInfoSync()
// const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
</script>

<style scoped lang="scss">
.navbar {
  width: 100%;
  box-sizing: border-box;
  padding: 0 8px;
  background-image: url(@/static/images/navigator_bg.png);
  background-size: cover;
  position: relative;
  display: flex;
  flex-direction: column;
  .logo {
    margin-top: 8px;
    .logo-image {
      margin: 0 4px;
      width: 80px;
    }
    .logo-text {
      font-size: 12px;
      color: #fff;
    }
  }
  .search {
    margin: 12px auto 8px;
    width: 100%;
    height: 22px;
    border-radius: 22px;
    box-sizing: border-box;
    padding: 0 8px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
  }
}
</style>
